

public class Test {
    public static void main(String[] args) {

        SingleLinkedList test=new SingleLinkedList(new SingleLinkedList.ListNode(10),10);
        test.addFirst(20);
        test.addLast(30);
        test.addIndex(1,40);
        test.addFirst(10);
        test.display();
        test.size();

        if(test.contains(20)){
            System.out.println(" 存在20");
        }
        else {
            System.out.println(" 不存在20");
        }

        test.remove(20);
        test.removeAllKey(10);
        test.display();

        test.addIndex(100,10);
    }
}
